import getPluginType from "../../utils/handlePlatform/getPluginType.js"

const pluginType = getPluginType()
const CONFIG_JSON_ID = process.env.CONFIG_JSON_ID
let customConfig = JSON.parse(localStorage.getItem(`${pluginType}-secondary-${CONFIG_JSON_ID}`))?.customConfig || {}
export let mockCustomConfig = customConfig

export const mockChangeCustomConfig = (customConfig) => {
  const mockData = JSON.parse(localStorage.getItem(`${pluginType}-secondary-${CONFIG_JSON_ID}`)) || {}
  mockData.customConfig = JSON.parse(customConfig)
  localStorage.setItem(`${pluginType}-secondary-${CONFIG_JSON_ID}`, JSON.stringify(mockData))
}

